package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:49 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductGlossaryAttrBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductGlossaryAttr productGlossaryAttr;

  protected BeanMap getBeanMap() {

    return new BeanMap(productGlossaryAttr);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.Id);

    mappedDaoFields.put(
        "productDefineId",
        com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.ProductDefineId);

    mappedDaoFields.put(
        "productGlossaryId",
        com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.ProductGlossaryId);

    mappedDaoFields.put(
        "attrName", com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.AttrName);

    mappedDaoFields.put(
        "attrType", com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.AttrType);

    mappedDaoFields.put(
        "dataRule", com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.DataRule);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.Remarks);

    mappedDaoFields.put(
        "isRequire", com.ourteam.product.requirement.dao.IProductGlossaryAttrDAO.IsRequire);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductGlossaryAttrBean() {
    super();

    this.productGlossaryAttr = new com.ourteam.product.requirement.dao.ProductGlossaryAttr();
  }

  public ProductGlossaryAttrBean(
      com.ourteam.product.requirement.dao.ProductGlossaryAttr productGlossaryAttr) {
    super();

    this.productGlossaryAttr = productGlossaryAttr;
  }

  public com.ourteam.product.requirement.dao.ProductGlossaryAttr convertToProductGlossaryAttr() {
    return this.productGlossaryAttr;
  }

  public com.ourteam.product.requirement.dao.ProductGlossaryAttr convertTo() {
    return this.productGlossaryAttr;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productGlossaryAttr.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productGlossaryAttr.setId(id);
  }

  /**
   * Get productDefineId
   *
   * @return long
   */
  public long getProductDefineId() {
    return (long) this.productGlossaryAttr.getProductDefineId();
  }

  /**
   * Set productDefineId
   *
   * @parameter long
   */
  public void setProductDefineId(long productDefineId) {

    this.productGlossaryAttr.setProductDefineId(productDefineId);
  }

  /**
   * Get productGlossaryId
   *
   * @return long
   */
  public long getProductGlossaryId() {
    return (long) this.productGlossaryAttr.getProductGlossaryId();
  }

  /**
   * Set productGlossaryId
   *
   * @parameter long
   */
  public void setProductGlossaryId(long productGlossaryId) {

    this.productGlossaryAttr.setProductGlossaryId(productGlossaryId);
  }

  /**
   * Get attrName
   *
   * @return String
   */
  public String getAttrName() {
    return (String) this.productGlossaryAttr.getAttrName();
  }

  /**
   * Set attrName
   *
   * @parameter String
   */
  public void setAttrName(String attrName) {

    this.productGlossaryAttr.setAttrName(attrName);
  }

  /**
   * Get attrType
   *
   * @return String
   */
  public String getAttrType() {
    return (String) this.productGlossaryAttr.getAttrType();
  }

  /**
   * Set attrType
   *
   * @parameter String
   */
  public void setAttrType(String attrType) {

    this.productGlossaryAttr.setAttrType(attrType);
  }

  /**
   * Get dataRule
   *
   * @return String
   */
  public String getDataRule() {
    return (String) this.productGlossaryAttr.getDataRule();
  }

  /**
   * Set dataRule
   *
   * @parameter String
   */
  public void setDataRule(String dataRule) {

    this.productGlossaryAttr.setDataRule(dataRule);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productGlossaryAttr.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productGlossaryAttr.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productGlossaryAttr.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productGlossaryAttr.setRemarks(remarks);
  }

  /**
   * Get isRequire
   *
   * @return String
   */
  public String getIsRequire() {
    return (String) this.productGlossaryAttr.getIsRequire();
  }

  /**
   * Set isRequire
   *
   * @parameter String
   */
  public void setIsRequire(String isRequire) {

    this.productGlossaryAttr.setIsRequire(isRequire);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductGlossaryAttrBean) == false) {
      return false;
    } // end if

    ProductGlossaryAttrBean other = (ProductGlossaryAttrBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductGlossaryAttr tempProductGlossaryAttr =
        other.convertToProductGlossaryAttr();

    if (tempProductGlossaryAttr == null || this.productGlossaryAttr == null) {
      isEqual = false;
    } else if (tempProductGlossaryAttr == this.productGlossaryAttr
        || tempProductGlossaryAttr.equals(this.productGlossaryAttr)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductGlossaryAttrBean[] toArray(
      com.ourteam.product.requirement.dao.ProductGlossaryAttr[] aProductGlossaryAttrs) {

    return toArray(aProductGlossaryAttrs, null);
  }

  public static ProductGlossaryAttrBean[] toArray(
      com.ourteam.product.requirement.dao.ProductGlossaryAttr[] aProductGlossaryAttrs,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductGlossaryAttrs)) {
      return new ProductGlossaryAttrBean[0];
    }

    int length = aProductGlossaryAttrs.length;

    ProductGlossaryAttrBean[] beans = new ProductGlossaryAttrBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductGlossaryAttrBean(aProductGlossaryAttrs[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductGlossaryAttrs[i]});
      }
    }

    return beans;
  }
}
